package com.gengine.resource.loader
{
	import com.fyGame.fyMap.*;
	import flash.utils.*;
	
	public class MapDataLoader extends BaseLoader
	{
		private var _mapInfo:FyMapInfo = null;
		
		public function MapDataLoader()
		{
			
		}
		
		public function get mapInfo() : FyMapInfo
		{
			return this._mapInfo;
		}
		
		override public function getClass() : Class
		{
			return MapDataLoader;
		}
		
		override public function initialize(param1:*) : void
		{
			if (!(param1 is ByteArray))
			{
				throw new Error("DataResource can only handle ByteArrays.");
			}
			var _loc_2:* = new FyMapInfo();
			_loc_2.read(param1);
			this._mapInfo = _loc_2;
			if (resourceInfo)
			{
				resourceInfo.data = this._mapInfo;
			}
			onLoadCompleteHandler();
			
		}
		
		override protected function onContentReady(param1:*) : Boolean
		{
			return this._mapInfo != null;
		}
		
	}
}
